// 错误示例

let value: any;
value = true;
value = 42;

let value2: unknown;
value2 = true;
value2 = 42;

const getMax = (list: any[]) => {
  return Math.max(...list);
};

// 正确示例
let value3: boolean = true;
let value4: number = 42;

const getMax2 = (list: number[]) => {
  return Math.max(...list);
};
